package com.ddwl.common.constant;

/**
 * 授权状态
 */
public enum SmsCaptchaNodeEnum {

    /**
     * 注册
     */
    REGISTER("register_code"),
    /**
     * 登录
     */
    LOGIN("login_code"),
    /**
     * 重置密码
     */
    RESET_PASSWORD("reset_password_code"),
    /**
     *
     */
    BIND_MOBILE("bind_mobile"),
    ;

    private String value;

    SmsCaptchaNodeEnum(String value) {
        this.value = value;
    }

    public String getValue() {
        return this.value;
    }

    public static SmsCaptchaNodeEnum getByValue(String value){
        for(SmsCaptchaNodeEnum resultEnum: SmsCaptchaNodeEnum.values()){
            if(resultEnum.getValue().equals(value)){
                return resultEnum;
            }
        }
        throw new IllegalArgumentException("枚举:" +SmsCaptchaNodeEnum.class.getSimpleName() + "不包含value:" + value);
    }
}
